#!/bin/bash -eu

make all

echo "Testing:"

for i in {1..20}
do 
   if [ -f "$i.in" ]
   then
      if diff <(./pc_sean.exe < "$i.in") <(./pc_fp.exe < "$i.in")
      then echo -n ""
      else
         echo "FAILED (FP)"
         exit 1
      fi

      if diff <(./pc_sean.exe < "$i.in") <(./pc_ratio.exe < "$i.in")
      then echo -n ""
      else
         echo "FAILED (RATIO)"
         exit 1
      fi
   fi
done

exit 0
